/*
 * @Author: Zhouhai 497675647@qq.com
 * @Date: 2022-08-17 10:34:02
 * @LastEditors: Zhouhai 497675647@qq.com
 * @LastEditTime: 2022-11-10 11:12:07
 */
/* eslint-disable @typescript-eslint/no-unused-vars */
import { Form, Input, Row, Col } from 'antd';
import React from 'react'

const Item = Form.Item;

export type BasicInfoFormProps = {
    datas: Record<string, string>;
    onValuesChange?: (changedValues: any, values: any) => void
}
const BasicInfoForm: React.FC<BasicInfoFormProps> = (Props) => {
    const { datas, onValuesChange } = Props;
    const [form] = Form.useForm();
    return (
        <Form
            onValuesChange={onValuesChange}
            initialValues={datas}
            labelWrap
            form={form}
        >
            <Row gutter={[32, 24]}>
                <Col span={12} >
                    <Item label="表名称" name={"tableName"} labelCol={{ span: 4 }} required>
                        <Input placeholder="请输入表名称" />
                    </Item>
                </Col>
                <Col span={12} >
                    <Item label="表描述" name={"tableComment"} labelCol={{ span: 4 }} required>
                        <Input placeholder="请输入表描述" />
                    </Item>
                </Col>
                <Col span={12} >
                    <Item label="实体类名称" name={"className"} labelCol={{ span: 4 }} required>
                        <Input placeholder="请输入实体类名称" />
                    </Item>
                </Col>
                <Col span={12} >
                    <Item label="作者" name={"functionAuthor"} labelCol={{ span: 4 }} required>
                        <Input placeholder="请输入作者" />
                    </Item>
                </Col>
                <Col span={24} >
                    <Item label="备注" name={"remark"} labelCol={{ span: 2 }}>
                        <Input.TextArea />
                    </Item>
                </Col>
            </Row>
        </Form>
    )
}
export default BasicInfoForm;